﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 using EF.Commons.Background.Entity;


namespace Common.Background.Data
{
    public class WebManageUser_StrategyRepository : BackgroundRepositoryBase, IWebManageUser_StrategyRepository
    {


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        public void InsertStrategy(WebManageUser_Strategy entity)
        {
            base.Insert<WebManageUser_Strategy>(entity);
        }

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        public void UpdateStrategy(WebManageUser_Strategy entity)
        {
            base.Update<WebManageUser_Strategy>(entity);
        }

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public IQueryable<WebManageUser_Strategy> GetModel()
        {
            return base.GetEntities<WebManageUser_Strategy>();
        }


        public WebManageUser_Strategy GetModel(int id)
        {
            return GetModel().FirstOrDefault(i => i.ManageUserID == id);
        }

        #region IWebDepartmentsRepository 成员


        public WebManageUser_Strategy Find(params object[] valueKeys)
        {
            return GetEntity<WebManageUser_Strategy>(valueKeys);
        }

        #endregion
    }
}
